import request from '@/utils/request'

export function qrCode() {
  return request({
    url: '/oauth/qrCode',
    method: 'get'
  })
}

export function qcStatus(data) {
  return request({
    url: '/oauth/qcStatus',
    method: 'post',
    data
  })
}

export function login(data) {
  return request({
    url: '/login',
    method: 'post',
    data
  })
}

export function logout(data) {
  return request({
    url: '/api/system/user/logout',
    method: 'post',
    data
  })
}

export function oauthLogin(data) {
  return request({
    url: '/oauth/login',
    method: 'post',
    data
  })
}

export function refreshToken() {
  return request({
    url: '/work/api/system/user/refreshToken',
    method: 'post'
  })
}

export function registerUser(data) {
  return request({
    url: '/oauth/registerUser',
    method: 'post',
    data
  })
}

export function bindingUser(data) {
  return request({
    url: '/oauth/bindingUser',
    method: 'post',
    data
  })
}

export function onlineUser(data) {
  return request({
    url: '/api/system/user/onlineUser',
    method: 'post',
    data
  })
}

export function deleteOnline(data) {
  return request({
    url: '/api/system/user/deleteOnline',
    method: 'delete',
    data
  })
}

export function getWebLog(data) {
  return request({
    url: '/api/system/user/getWebLog',
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: '/api/system/user/getUserInfo',
    method: 'post'
  })
}

export function updateUserPassword(data) {
  return request({
    url: '/api/system/user/updateUserPassword',
    method: 'post',
    data
  })
}
export function getInfoList(data) {
  return request({
    url: '/api/system/user/getInfoList',
    method: 'post',
    data
  })
}

export function resetUserPassword(data) {
  return request({
    url: '/api/system/user/resetUserPassword',
    method: 'post',
    data
  })
}

export function updateUserStatus(data) {
  return request({
    url: '/api/system/user/updateUserStatus',
    method: 'post',
    data
  })
}

export function deleteUser(data) {
  return request({
    url: '/api/system/user/deleteUser',
    method: 'delete',
    data
  })
}

export function recoveryUser(data) {
  return request({
    url: '/api/system/user/recoveryUser',
    method: 'post',
    data
  })
}

export function getUser(data) {
  return request({
    url: '/api/system/user/getUser',
    method: 'post',
    data
  })
}

export function updateUser(data) {
  return request({
    url: '/api/system/user/updateUser',
    method: 'post',
    data
  })
}

export function getUserRole(data) {
  return request({
    url: '/api/system/user/getUserRole',
    method: 'post',
    data
  })
}

export function updateUserRole(data) {
  return request({
    url: '/api/system/user/updateUserRole',
    method: 'post',
    data
  })
}

export function userAdd(data) {
  return request({
    url: '/api/system/user/userAdd',
    method: 'post',
    data
  })
}

export function isUpdateUserInfo(data) {
  return request({
    url: '/api/system/user/isUpdateUserInfo',
    method: 'post',
    data
  })
}

export function obtainPhoneCode(data) {
  return request({
    url: '/api/sms/obtainPhoneCode',
    method: 'post',
    data
  })
}

export function updatePhone(data) {
  return request({
    url: '/api/system/user/updatePhone',
    method: 'post',
    data
  })
}

export function obtainEmailCode(data) {
  return request({
    url: '/api/email/obtainEmailCode',
    method: 'post',
    data
  })
}

export function updateEmail(data) {
  return request({
    url: '/api/system/user/updateEmail',
    method: 'post',
    data
  })
}

export function getAccInfo() {
  return request({
    url: '/api/system/user/getAccInfo',
    method: 'post'
  })
}

export function untyingOauthInfoUser(data) {
  return request({
    url: '/api/system/user/untyingOauthInfoUser',
    method: 'post',
    data
  })
}
